import com.google.appengine.api.datastore.*


if (params.name) {
    def e = new Entity("rsvp")
    e.id = UUID.randomUUID().toString().replaceAll('-','') 
    e.name = params.name
    e.appies = params.appies
    e.main = params.main
    e.dessert = params.dessert
    e.save()

    request['thanks'] = "Thank you $e.name for RSVP'ing"

}

def entities = datastore.execute {
    select all from rsvp
    limit 200
}
request['allPeople'] = entities

forward '/WEB-INF/pages/menu.gtpl'